package com.zuipin.vo;

import java.util.List;

import com.zuipin.entity.SysMenu;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 菜单
 */
@ApiModel(description = "菜单Node")
public class MenuTreeNode {
	
	public MenuTreeNode() {
		super();
	}
	
	public MenuTreeNode(Long id, String menuName) {
		this.id = id;
		this.menuName = menuName;
	}
	
	public MenuTreeNode(SysMenu m) {
		if (m != null) {
			this.id = m.getId();
			this.sysId = m.getSysId();
			this.menuName = m.getMenuName();
			this.menuCode = m.getMenuCode();
			this.path = m.getPath();
			this.menuLevel = m.getMenuLevel();
			this.hrefUrl = m.getHrefUrl();
			this.imgUrl = m.getImgUrl();
			this.iconUrl = m.getIconUrl();
			this.sort = m.getSort();
			this.delFlag = m.getDelFlag();
			this.menuStatus = m.getMenuStatus();
			this.remark = m.getRemark();
			this.isPublic = m.getIsPublic();
			this.parentId = m.getParentId();
			this.createId = m.getCreateId();
			this.createTime = m.getCreateTime();
			this.updateId = m.getUpdateId();
			this.updateTime = m.getUpdateTime();
		}
	}
	
	private Long				id;							// 主键 自增长
	private String				sysId;						// 系统id
	private String				menuName;					// 菜单(模块)名
	private String				menuCode;					// 菜单（模块）编号
	private String				path;						// 菜单层级路径
	private Integer				menuLevel;					// 菜单级别
	private String				hrefUrl;					// 菜单链接
	private Long				parentId;					// 父级菜单id
	private String				imgUrl;						// 菜单图片地址
	private String				iconUrl;					// 菜单小图标 icon
	private Integer				sort;						// 排序号
	private Integer				delFlag;					// 0:未删除 1:已删除
	private Integer				menuStatus;					// 是否冻结 0:未冰结 1已冻结
	private String				remark;						// 模块描述,/备注
	private Integer				isPublic;					// 是否为公共模块（任务角色都能拥有的权限）
	private Integer				createId;					// 操作人
	private String				createTime;					// 创建时间
	private Integer				updateId;					// 更新人
	private String				updateTime;					// 更新时间
	private List<MenuTreeNode>	childMenus;					// 子模块（菜单）
	private Integer				hasPermission		= 0;	// 是否拥有权限
	
	/**
	 * 有权限
	 */
	public static final Integer	HAS_PERMISSION		= 1;
	/**
	 * 无权限
	 */
	public static final Integer	NO_PERMISSION		= 0;
	
	/**
	 * 无权限
	 */
	public static final Long	DEFAULT_HEAD_NODE	= 0l;
	
	@ApiModelProperty(value = "主键 自增长")
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@ApiModelProperty(value = "系统id")
	public String getSysId() {
		return sysId;
	}
	
	public void setSysId(String sysId) {
		this.sysId = sysId;
	}
	
	@ApiModelProperty(value = "菜单(模块)名")
	public String getMenuName() {
		return menuName;
	}
	
	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	
	@ApiModelProperty(value = "菜单（模块）编号")
	public String getMenuCode() {
		return menuCode;
	}
	
	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}
	
	@ApiModelProperty(value = "菜单层级路径")
	public String getPath() {
		return path;
	}
	
	public void setPath(String path) {
		this.path = path;
	}
	
	@ApiModelProperty(value = "菜单级别")
	public Integer getMenuLevel() {
		return menuLevel;
	}
	
	public void setMenuLevel(Integer menuLevel) {
		this.menuLevel = menuLevel;
	}
	
	@ApiModelProperty(value = "菜单链接")
	public String getHrefUrl() {
		return hrefUrl;
	}
	
	public void setHrefUrl(String hrefUrl) {
		this.hrefUrl = hrefUrl;
	}
	
	@ApiModelProperty(value = "父级菜单id")
	public Long getParentId() {
		return parentId;
	}
	
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	
	@ApiModelProperty(value = "菜单图片地址")
	public String getImgUrl() {
		return imgUrl;
	}
	
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	
	@ApiModelProperty(value = "菜单小图标 icon")
	public String getIconUrl() {
		return iconUrl;
	}
	
	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}
	
	@ApiModelProperty(value = "排序号")
	public Integer getSort() {
		return sort;
	}
	
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@ApiModelProperty(value = "0:未删除 1:已删除")
	public Integer getDelFlag() {
		return delFlag;
	}
	
	public void setDelFlag(Integer delFlag) {
		this.delFlag = delFlag;
	}
	
	@ApiModelProperty(value = "是否冻结 0:未冰结 1已冻结")
	public Integer getMenuStatus() {
		return menuStatus;
	}
	
	public void setMenuStatus(Integer menuStatus) {
		this.menuStatus = menuStatus;
	}
	
	@ApiModelProperty(value = "模块描述,/备注")
	public String getRemark() {
		return remark;
	}
	
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@ApiModelProperty(value = "是否为公共模块（任务角色都能拥有的权限）")
	public Integer getIsPublic() {
		return isPublic;
	}
	
	public void setIsPublic(Integer isPublic) {
		this.isPublic = isPublic;
	}
	
	@ApiModelProperty(value = "操作人")
	public Integer getCreateId() {
		return createId;
	}
	
	public void setCreateId(Integer createId) {
		this.createId = createId;
	}
	
	@ApiModelProperty(value = "创建时间")
	public String getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	@ApiModelProperty(value = "更新人")
	public Integer getUpdateId() {
		return updateId;
	}
	
	public void setUpdateId(Integer updateId) {
		this.updateId = updateId;
	}
	
	@ApiModelProperty(value = "更新时间")
	public String getUpdateTime() {
		return updateTime;
	}
	
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	
	@ApiModelProperty(value = "子菜单")
	public List<MenuTreeNode> getChildMenus() {
		return childMenus;
	}
	
	public void setChildMenus(List<MenuTreeNode> childMenus) {
		this.childMenus = childMenus;
	}
	
	@ApiModelProperty(value = "是否拥有权限，0：未拥有 1：拥有")
	public Integer getHasPermission() {
		return hasPermission;
	}
	
	public void setHasPermission(Integer hasPermission) {
		this.hasPermission = hasPermission;
	}
	
}
